<?php

namespace App\Models\Search;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;

use App\Models\Search\Search;
use App\Models\User\UserDetail;
use App\Models\Search\SearchExogenousData;

class SearchResult extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'search_result';
    protected $guarded = [];
    public $timestamps = false;

    public function search(){
        return $this->hasOne(Search::class, 'id', 'search_id');
    }

    public function idata(){
        return $this->hasOne(UserDetail::class, 'id', 'result_id');
    }

    public function edata(){
        return $this->hasOne(SearchExogenousData::class, 'id', 'result_id');
    }
}
